package com.adou.d9.api;

import java.util.StringJoiner;

public class Test5 {
    public static void main(String[] args) {
        int[] arr = {11,22,33,44};
        getArrData(arr);
    }

    public static String getArrData(int[] arr){
        if(arr == null) {
            return null;
        }

        StringJoiner sj = new StringJoiner(",", "[", "]");
        for (int i = 0; i < arr.length; i++) {
            sj.add(arr[i] + "");
        }
        System.out.println(sj);
        return sj.toString();
    }
}
